<template>
  <view class="tag">{{ getTagName() }}</view>
</template>

<script>
// 新旧slot
import { OLD_NEW_MAP, EMPTY_PLACEHOLDER } from "../../../utils/constant.js"

export default {
  name: "xinjiuSlot",

  props: {
    productObj: {
      type: Object,
      default: {}
    }, // 商品描述数据
  },
  
  data() {
    return {
      corlo:"#fcc"
    }
  },
  
  methods: {
    getTagName() {
      const level = this.productObj.oldNewDegree // 新旧程度标识
      return OLD_NEW_MAP[level] || EMPTY_PLACEHOLDER
    }
  }
}
</script>

<style lang="scss">
.tag {
  height: 37rpx;
  line-height: 37rpx;
  @include global-background-color();
  padding: 4rpx 16rpx;
  font-size: 20rpx;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 500;
  color: #333333;
  border-radius: 20rpx 0rpx 20rpx 0rpx;
}
</style>
